<div class='work_item_form'>
  <div class='form'>
    <%  remote_form_for @work_item,
          :update => "stage_#{@work_item.stage_id}_type_#{@work_item.work_item_type_id}_work_items",
          :url => work_item_url(@work_item),
          :method => :put,
          :loading => short_loader("stage_#{@work_item.stage_id}_type_#{@work_item.work_item_type_id}_work_items",:height => 265,:width => 713),
          :html => {
            :id => "new_stage_#{@work_item.stage_id}_type_#{@work_item.work_item_type_id}_work_item_form"
          } do |f| %>
      <dl>
        <dt>工作项名称：</dt>
        <dd>
          <%= f.hidden_field :work_item_type_id %>
          <%= f.hidden_field :stage_id %>
          <%= f.text_field :name, :size => 50 %>
        </dd>
      </dl>
      <dl>
        <dt>单价：</dt>
        <dd>
          <%= f.text_field :pay_unit, :size => 50 %>
        </dd>
      </dl>
      <dl>
        <dt class='l'>备注：</dt>
        <dd>
          <%= f.text_area :remark %>
        </dd>
      </dl>
    <% end %>
  </div>
  <div class='buttons'>
    <%= link_to_function '保存',
          "$('new_stage_#{@work_item.stage_id}_type_#{@work_item.work_item_type_id}_work_item_form').onsubmit()",
          :class => 'save button'
      %>
    <%= link_to_remote '返回',
          :update => "stage_#{@work_item.stage_id}_type_#{@work_item.work_item_type_id}_work_items",
          :url => work_items_url(:stage_id => @work_item.stage.id, :work_item_type_id => @work_item.work_item_type.id),
          :method => :get,
          :complete => "Effect.BlindDown('stage_#{@work_item.stage_id}_type_#{@work_item.work_item_type_id}_work_items')",
          :html => {
            :class => 'go_back button'
          }
      %>
  </div>
</div>